<!DOCTYPE html>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面试历史 | 智能面试系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4cc9f0;
            --light-bg: #f8f9fa;
            --dark-text: #212529;
            --border-radius: 12px;
            --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        
        body {
            margin: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--light-bg);
            color: var(--dark-text);
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .header {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            border-radius: var(--border-radius);
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: var(--box-shadow);
        }
        
        .header h1 {
            margin: 0;
            font-size: 2.5rem;
            font-weight: 700;
        }
        
        .header p {
            margin: 10px 0 0 0;
            opacity: 0.9;
            font-size: 1.1rem;
        }
        
        .home-button {
            background-color: rgba(255, 255, 255, 0.2);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
        }
        
        .home-button:hover {
            background-color: rgba(255, 255, 255, 0.3);
            border-color: white;
            transform: translateY(-2px);
            color: white;
        }
        
        .home-button i {
            margin-right: 8px;
        }
        
        .stats-card {
            background: white;
            border-radius: var(--border-radius);
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: var(--box-shadow);
            border-left: 4px solid var(--accent-color);
        }
        
        .stats-card .badge {
            font-size: 1.5rem;
            font-weight: bold;
            background-color: var(--accent-color);
            color: white;
            padding: 10px 15px;
            border-radius: 50%;
        }
        
        .interview-card {
            background: white;
            border-radius: var(--border-radius);
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: var(--box-shadow);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border-top: 4px solid var(--primary-color);
        }
        
        .interview-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        
        .interview-card h3 {
            color: var(--primary-color);
            margin-top: 0;
            margin-bottom: 15px;
            font-size: 1.5rem;
            font-weight: 600;
        }
        
        .interview-card .description {
            margin-bottom: 20px;
            color: #495057;
            line-height: 1.5;
        }
        
        .interview-details {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .detail-item {
            display: flex;
            align-items: center;
            color: #6c757d;
            font-size: 0.95rem;
        }
        
        .detail-item i {
            color: var(--accent-color);
            margin-right: 8px;
            width: 20px;
            text-align: center;
        }
        
        .no-records {
            text-align: center;
            padding: 60px 20px;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
        }
        
        .no-records i {
            font-size: 4rem;
            color: #dee2e6;
            margin-bottom: 20px;
        }
        
        .no-records h3 {
            color: #6c757d;
            margin-bottom: 10px;
        }
        
        .no-records p {
            color: #adb5bd;
        }
        
        /* 加载动画 */
        .skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: skeleton-loading 1.5s infinite;
            border-radius: 4px;
        }
        
        @keyframes skeleton-loading {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .header h1 {
                font-size: 2rem;
            }
            
            .header .d-flex {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .home-button {
                margin-top: 15px;
                padding: 8px 16px;
                font-size: 0.9rem;
            }
            
            .interview-details {
                flex-direction: column;
                gap: 10px;
            }
            
            .interview-card {
                padding: 20px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="d-flex justify-content-between align-items-center">
                <div>
                    <h1><i class="fas fa-history mr-2"></i>面试历史</h1>
                    <p>管理和查看您的所有面试记录</p>
                </div>
                <a href="/home" class="home-button">
                    <i class="fas fa-home"></i>返回首页
                </a>
            </div>
        </div>
        
        <div th:if="${interviews != null and not interviews.isEmpty()}">
            <div class="stats-card">
                <div class="d-flex align-items-center">
                    <span class="badge mr-3"><i class="fas fa-file-alt"></i> <span th:text="${interviews.size()}"></span></span>
                    <div>
                        <h3 class="h5 mb-0">面试记录总数</h3>
                        <p class="text-muted mb-0">所有已完成的面试会话</p>
                    </div>
                </div>
            </div>
            
            <div th:each="interview : ${interviews}" class="interview-card">
                <h3><i class="fas fa-briefcase mr-2"></i><span th:text="${interview.jobTitle}">职位标题</span></h3>
                
                <div class="description" th:text="${interview.jobDescription}">职位描述</div>
                
                <div class="interview-details">
                    <div class="detail-item">
                        <i class="fas fa-industry"></i>
                        <span th:text="${interview.industry}">行业</span>
                    </div>
                    <div class="detail-item">
                        <i class="fas fa-calendar-alt"></i>
                        <span th:text="${interview.createTime}">创建时间</span>
                    </div>
                    <div class="detail-item">
                        <i class="fas fa-id-card"></i>
                        <span>简历ID: <span th:text="${interview.resumeId}"></span></span>
                    </div>
                </div>
            </div>
        </div>
        
        <div th:if="${interviews == null or interviews.isEmpty()}">
            <div class="no-records">
                <i class="fas fa-search"></i>
                <h3>没有找到面试历史记录</h3>
                <p>您还没有创建任何面试记录</p>
            </div>
        </div>
    </div>
    
    <!-- Bootstrap JavaScript -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <!-- 页面交互脚本 -->
    <script>
        // 为卡片添加平滑展开/折叠效果
        document.addEventListener('DOMContentLoaded', function() {
            const interviewCards = document.querySelectorAll('.interview-card');
            
            interviewCards.forEach(card => {
                card.addEventListener('mouseenter', function() {
                    this.style.transform = 'translateY(-5px)';
                    this.style.boxShadow = '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)';
                });
                
                card.addEventListener('mouseleave', function() {
                    this.style.transform = 'translateY(0)';
                    this.style.boxShadow = '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)';
                });
            });
        });
    </script>
</body>
</html>